<template>
  <div>
     <h1>孙子辈组件</h1>
     <h1>祖先组件：{{myname}}</h1>
     <h1>{{myage}}</h1>
     <h1>{{mysex}}</h1>
  </div>
</template>
<script>
export default {
  name:"sunCom",
  inject:["myname","myage","mysex"],
  mounted(){
    console.log(this.myname,"-----------")
  }
}
</script>